package com.hcw.skycloud.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hcw.core.mybatis.PageForm;
import com.hcw.skycloud.domain.Artical;
import com.hcw.skycloud.mapper.ArticalMapper;
import com.hcw.skycloud.service.ArticalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by huangchunwu on 2016/10/29.
 */
@Component
public class ArticalServiceImpl   implements ArticalService {

    @Autowired
    private ArticalMapper articalMapper;

    public PageInfo<Artical> getArticePageList(PageForm pageForm) {
        PageHelper.startPage(pageForm.getPage(), pageForm.getRows());
        List<Artical> list = articalMapper.selectAll();
        PageInfo<Artical> pageInfo = new PageInfo(list);
        return pageInfo;
    }
}



